<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

class CourseColumnStoreRequest extends FormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => 'bail|required|string',
            'thumb' => 'bail|nullable|string',
            'background_image' => 'bail|nullable|string',
            'resource_tags' => 'bail|nullable|array',
            'coupon_ids' => 'bail|nullable|array',
            'resource' => 'bail|required|array',
            'gift_enabled' => 'bail|required|int|in:0,1',
            'components' => 'bail|nullable|array',
            'original_price' => 'bail|required|numeric',
            'price' => 'bail|required|numeric',
            'view_count' => 'bail|nullable|int',
            'buy_count' => 'bail|nullable|int',
            'learn_count' => 'bail|nullable|int',
            'section_count' => 'bail|nullable|int',
            'details' => 'bail|nullable|string',
            'is_done' => 'bail|required|int|in:0,1',
            'is_active' => 'bail|required|int|in:0,1',
            'is_limited_free' => 'bail|nullable|int|in:0,1',
            'limited_free_start_at' => 'bail|nullable|string',
            'limited_free_end_at' => 'bail|nullable|string',
            'is_recommend' => 'bail|required|int|in:0,1',
            'sort' => 'bail|nullable|int',
            'effective_type' => 'bail|required|int',
            'effective_days' => 'bail|nullable|int',
            'effective_hours' => 'bail|nullable|int',
            'effective_date' => 'bail|nullable|string',
        ];
    }
}
